<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
	FB.init({
	 appId  : '463995797026190',
	 status : true, // check login status
	 cookie : true, // enable cookies to allow the server to access the session
	 xfbml  : true// parse XFBML
	 });
	FB.Canvas.setSize({ width: 800, height: 1000 });
 </script>
<?php
	$baivietcuapage = $this->baivietcuapage;
?>
<input type="button" name="themndmoi" value="Thêm bài" onclick="window.location.href='baivietcuapage/add'"/>
<input type="hidden" id="linkpageshare" value=""/>
<table border="1" class="spdg">
	<tr>
		<th width="20">STT</th>
        <th width="120">Tên Fanpage</th>
		<th width="180">Tên bài viết</th>
		<th width="50">Công Cụ</th>
	</tr>
	<?php
		for($i=0; $i<count($baivietcuapage); $i++)
		{
	?>

	<tr>
		<td align="center"><?php echo $i+1; ?></td>
        <td><?php echo $baivietcuapage[$i]['page_name'] ?></td>
		<td>
			<?php echo $baivietcuapage[$i]['tieude'] ?>
		</td>
        <td align="center"  valign="center">
			<a href="<?php echo APP_DOMAIN ?>/admin/baivietcuapage/edit?idpage=<?php echo $baivietcuapage[$i]['idpage']?>"><img title="Chi Tiết Nội dung" alt="ct" src="<?php echo APP_DOMAIN ?>/application/templates/giaodien_admin/images/sua.png"></a>
			<a onclick="return confirm('Bạn có chắc chắn muốn xóa không.')"  href="<?php echo APP_DOMAIN ?>/admin/baivietcuapage/delete?idpage=<?php echo $baivietcuapage[$i]['idpage']?>">
				<img title="Xóa Sản Phẩm" alt="xoa" src="<?php echo APP_DOMAIN ?>/application/templates/giaodien_admin/images/xoa.png"></a>
		</td>
	</tr>
	<?php } ?>

</table>
<input type="button" name="themndmoi" value="Thêm bài" onclick="window.location.href='baivietcuapage/add'"/>